package com.ruoyi.logistic.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.logistic.domain.NetworkSettlementDetail;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.logistic.domain.vo.NetworkSettlementDetailVo;
import com.ruoyi.logistic.mapper.NetworkSettlementDetailMapper;
import com.ruoyi.logistic.service.INetworkSettlementDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;
@Service
public class NetworkSettlementDetailServiceImpl implements INetworkSettlementDetailService {
    @Autowired
    private NetworkSettlementDetailMapper networkSettlementDetailMapper;
    @Override
    public List<NetworkSettlementDetail> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return networkSettlementDetailMapper.selectAll();
    }

    @Override
    public Boolean insert(NetworkSettlementDetail networkSettlementDetail) {
        return networkSettlementDetailMapper.insert(networkSettlementDetail);
    }

    @Override
    public Boolean update(NetworkSettlementDetail networkSettlementDetail) {
        return networkSettlementDetailMapper.update(networkSettlementDetail);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return networkSettlementDetailMapper.deleteById(id);
    }

    @Override
    public NetworkSettlementDetail findById(Integer id) {
        return networkSettlementDetailMapper.findById(id);
    }

    @Override
    public List<NetworkSettlementDetail> search(NetworkSettlementDetailVo networkSettlementDetailVo) {
        PageHelper.startPage(networkSettlementDetailVo.getPageDate());
        return networkSettlementDetailMapper.search(networkSettlementDetailVo);
    }
}
